<?php
class UserBarWidget extends Widget {
	function render($data){
		$user=getMember();
		if(!$user)
		{
			return '<a href="/Passport/login">登录</a> | <a href="/Passport/reg">免费注册</a>';
		}else{
			return $user['username'] ." <a href='/Passport/logout'>退出</a> ";
		}
	}
}